package 设计模式.observer;

/**
 * @功能
 * @创建时间 2020/5/4
 */
public class Client {
    public static void main(String[] args) {
        ConcreteSubject subject = new ConcreteSubject();
        ObserA ob1 = new ObserA();
        ObserA ob2 = new ObserA();
        ObserA ob3 = new ObserA();
        ObserA ob4 = new ObserA();
        subject.register(ob1);
        subject.register(ob2);
        subject.register(ob3);
        subject.register(ob4);
        subject.setState(30);
        System.err.println(ob1.getMyState());


    }
}
